package com.itheima.tlais_web_management.mapper;

import com.itheima.tlais_web_management.pojo.Emp;
import com.itheima.tlais_web_management.pojo.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface StudentMapper {

    List<Student> list(@Param("name") String name,@Param("educationId") Integer educationId,@Param("number") String number,@Param("classId") Integer classId);

    @Select("select * from tlias.student where id = #{id}")
    Student getbyid(@Param("id") Integer id);

    void update(Student student);

    @Insert("insert into tlias.student(name, number, gender, phone, education_id) VALUES " +
            "(#{name},#{number},#{gender},#{phone},#{educationId})")
    void save(Student student);


    void delete(@Param("ids") List<Integer> ids);


}
